package com.njupt.controller;

import com.njupt.common.pojo.TaotaoResult;
import com.njupt.service.ItemDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: XJL
 * @Description:
 * @Date: Create in 11:48 2018/5/28
 * @Modified By:
 **/
@Controller
public class ItemDescController {

    @Autowired
    private ItemDescService itemDescService;

    /**
     * 加载商品描述
     * @param id
     * @return
     */
    @ResponseBody
    @RequestMapping("/rest/item/query/item/desc/{id}")
    public TaotaoResult getItemDesc(@PathVariable("id") Long id){
       TaotaoResult result = itemDescService.getItemDesc(id);
        return result;
    }

}
